package jdbc;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Scanner;

/**
 * DBUtil工具类测试
 */
public class JDBCDemo4 {
    public static void main(String[] args) {
        try {
            Connection connection = DBUtil.getConnection();
            Statement statement = connection.createStatement();
            Scanner scanner = new Scanner(System.in);
            System.out.println("请输入用户名");
            String name = scanner.nextLine();
            System.out.println("请输入密码");
            String password = scanner.nextLine();
            //删除密码
            String sql = "DELETE FROM user WHERE name = '"+name+"' AND password = '"+password+"'";
            connection.close();
        }catch (SQLException e){
            throw new RuntimeException(e);
        }

    }
}
